package com.qidianit.mes.pro.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.qidianit.mes.pojo.Result;
import com.qidianit.mes.pojo.pro.MaterialBom;
import com.qidianit.mes.pro.mapper.MaterialBomMapper;
import com.qidianit.mes.pro.service.MaterialBomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description:
 * @Author: YanJiRan
 * @Date: 2025/9/23 - 上午11:34
 */
@Service
public class MaterialBomServiceImpl implements MaterialBomService {
    @Autowired
    private MaterialBomMapper materialBomMapper;
    @Override
    public Result<PageInfo<MaterialBom>> selectList(MaterialBom materialBom, int page, int size) {
        //开启分页
        PageHelper.startPage(page,size);
        List<MaterialBom> materialBoms = materialBomMapper.selectList(materialBom);
        return Result.success(new PageInfo<>(materialBoms));
    }

    @Override
    public Result<MaterialBom> saveMaterialBom(MaterialBom materialBom) {
        return null;
    }

    @Override
    public Result<MaterialBom> selectById(Long id) {
        return Result.success(materialBomMapper.selectById(id));
    }

    @Override
    public Result updateById(MaterialBom materialBom) {
        return null;
    }

    @Override
    public Result deleteById(Long id) {
        return null;
    }

    @Override
    public Result batchDelete(Long[] ids) {
        return null;
    }
}
